/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package src;

/**
 *
 * @author usuario_local
 */
public enum Permisos {
    GUEST (0),
    USER (1),
    ADMIN (2);

    private final int valor;

    Permisos(int valor) {
        this.valor = valor;
    }

    public int compare(Permisos p){
        return (this.valor-p.valor);
    }

    @Override
    public String toString(){
        if (this == ADMIN) return "Administrador";
        else if(this == USER) return "Usuario";
        else return "Invitado";
    }
}
